CC = gcc
CFLAGS = -Wall -Wextra -g
TARGET = kv_store_test

all: $(TARGET)

$(TARGET): kv_store.o main.o
	$(CC) $(CFLAGS) -o $(TARGET) kv_store.o main.o

kv_store.o: kv_store.c kv_store.h
	$(CC) $(CFLAGS) -c kv_store.c

main.o: main.c kv_store.h
	$(CC) $(CFLAGS) -c main.c

clean:
	rm -f $(TARGET) *.o kv_data.txt

run: $(TARGET)
	./$(TARGET)